/*邮件管理*/
layui.define(['layer','form'], function(exports) {
    var $ = layui.jquery;
    var layer=layui.layer;
    var form = layui.form();

    $('#btn_save').click(function(){
        if($("#title").val()==""){layer.msg("请填写作息名称");return false;}
        if($("#role").val()==""){layer.msg("请选择角色");return false;}
        if($("#am_on").val()==""){layer.msg("请选择上午上班时间");return false;}
        if($("#am_off").val()==""){layer.msg("请选择上午下班时间");return false;}
        if($("#pm_on").val()==""){layer.msg("请选择下午上班时间");return false;}
        if($("#pm_off").val()==""){layer.msg("请选择下午下班时间");return false;}
        $.post('/html/attend/srv/edit_rest.php',$('#form1').serialize(),function(e){
            layer.msg(e);      
            setTimeout("parent.layer.close(parent.layer.getFrameIndex(window.name))", 2000);
        })
    });  
    exports('edit_rest', {});
    
});